﻿// Decompiled with JetBrains decompiler
// Type: System.Web.Razor.Generator.CSharpRazorCodeGenerator
// Assembly: System.Web.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
// MVID: 682513D6-F37E-48AC-9909-F3EE103CFF14
// Assembly location: D:\Project\Idea\无人机外网\uav\客户端工程\排查工具\bin\Release\System.Web.Razor.dll

using System.CodeDom;

namespace System.Web.Razor.Generator
{
  /// <summary>This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code. Represents a Razor code generator for C# language.</summary>
  public class CSharpRazorCodeGenerator : RazorCodeGenerator
  {
    private const string HiddenLinePragma = "#line hidden";

    /// <summary>This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code. Initializes a new instance of the <see cref="T:System.Web.Razor.Generator.CSharpRazorCodeGenerator" /> class.</summary>
    /// <param name="className">The class name for the generated class type declaration.</param>
    /// <param name="rootNamespaceName">The name for the generated namespace declaration.</param>
    /// <param name="sourceFileName">The source file.</param>
    /// <param name="host">The Razor engine host.</param>
    public CSharpRazorCodeGenerator(
      string className,
      string rootNamespaceName,
      string sourceFileName,
      RazorEngineHost host)
      : base(className, rootNamespaceName, sourceFileName, host)
    {
    }

    internal override Func<CodeWriter> CodeWriterFactory => (Func<CodeWriter>) (() => (CodeWriter) new CSharpCodeWriter());

    /// <summary>This type/member supports the .NET Framework infrastructure and is not intended to be used directly from your code. Initializes the context for this code generator.</summary>
    /// <param name="context">The context for this code generator.</param>
    protected override void Initialize(CodeGeneratorContext context)
    {
      base.Initialize(context);
      context.GeneratedClass.Members.Insert(0, (CodeTypeMember) new CodeSnippetTypeMember("#line hidden"));
    }
  }
}
